﻿using HenuAlbum.Identity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace HenuAlbum.Models
{
    public class Album
    {
        public int Id { get; set; }

        [Required]
        [MaxLength(32)]
        public string Title { get; set; }

        [MaxLength(512)]
        public string Description { get; set; }

        public int CreatorId { get; set; }

        public string Discriminator { get; set; }

        public User Creator { get; set; }

        [Required]
        public DateTime CreateTime { get; set; }

        [Required]
        public bool IsPublic { get; set; } = false;

        public List<Resource> Resources { get; set; } = new List<Resource>();

        /// <summary>
        /// 点赞数
        /// </summary>
        public List<UserLikeAlbum> Like { get; set; } = new List<UserLikeAlbum>();

        public List<Comments> Comments { get; set; } = new List<Comments>();
    }
}
